-- GENERATED SPELL FOR [Holdout Medic] --


function spell0_6392(pUnit, Event) --@Heal,Heal--
pUnit:FullCastSpellOnTarget(22167,pUnit)
pUnit:RegisterEvent('Sorts_6392', 3500, 1)
end

function spell1_6392(pUnit, Event) --@Power Word: Fortitude,n/a--
pUnit:FullCastSpellOnTarget(13864,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6392', 613, 1)
end

function spell2_6392(pUnit, Event) --@Renew,Heal--
pUnit:FullCastSpellOnTarget(22168,pUnit)
pUnit:RegisterEvent('Sorts_6392', 22000, 1)
end

function Sorts_6392(pUnit, Event)
local choix_sorts_6392 = math.random(0, 2)
if choix_sorts_6392 == 0 then
pUnit:RegisterEvent('spell0_6392', 1, 1)
end
if choix_sorts_6392 == 1 then
pUnit:RegisterEvent('spell1_6392', 1, 1)
end
if choix_sorts_6392 == 2 then
pUnit:RegisterEvent('spell2_6392', 1, 1)
end
end

function mob6392_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_6392', math.random(1500, 3000), 1)
end

function mob6392_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6392_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6392_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(6392, 1, 'mob6392_Action')
RegisterUnitEvent(6392, 2, 'mob6392_Leave')
RegisterUnitEvent(6392, 3, 'mob6392_Kill')
RegisterUnitEvent(6392, 4, 'mob6392_Die')
